package com.qianqian.service.config;

import com.qianqian.service.interceptor.ApiSourceVerificationInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //需用户验证接口的拦截器，添加拦截路径和排除拦截路径
        registry.addInterceptor(new ApiSourceVerificationInterceptor()).addPathPatterns("/zhuanPan/**").addPathPatterns("/account/**");

    }

}
